package com.yanqu.road.logic.bussiness.player;


import com.yanqu.road.entity.crossorewar.CrossUserOrePit;
import com.yanqu.road.entity.orewar.*;
import com.yanqu.road.entity.player.UserOreWarPatronsData;
import com.yanqu.road.logic.bussiness.DaoHelper;

import java.util.LinkedList;
import java.util.List;
import java.util.Map;

public class UserOreWarBussiness {


	public static Map<Integer, UserOrePit> getUserOrePitMap(int activityId) {
		return DaoHelper.getUserOreWarDaoImpl().getUserOrePitMap(activityId);
	}

	public static boolean initUserOrePitMap(Map<Integer, OrePitInfo> orePitInfoMap, Map<Integer, UserOrePit> userOrePitMap) {
		return DaoHelper.getUserOreWarDaoImpl().initUserOrePitMap(orePitInfoMap, userOrePitMap);
	}

	public static boolean updateUserOrePitList(List<UserOrePit> userOrePitList) {
		return DaoHelper.getUserOreWarDaoImpl().updateUserOrePitList(userOrePitList);
	}

	public static Map<Integer, UserOreRefuge> getUserOreRefugeMap(long userId,int activityId) {
		return DaoHelper.getUserOreRefugeDaoImpl().getUserOreRefugeMap(userId,activityId);
	}

	public static List<Long> getNeedRecallRefugeUserList(int activityId,long timestampSecNeed) {
		return DaoHelper.getUserOreRefugeDaoImpl().getNeedRecallRefugeUserList(activityId,timestampSecNeed);
	}

	public static boolean isNeedRecallRefugeUser(int activityId,long userId,long timestampSecNeed) {
		return DaoHelper.getUserOreRefugeDaoImpl().isNeedRecallRefugeUser(activityId,userId,timestampSecNeed);
	}

	public static void updateUserOreRefugeList(List<UserOreRefuge> data) {
		DaoHelper.getUserOreRefugeDaoImpl().updateUserOreRefugeList(data);
	}

	public static boolean addUserOreRefuge(UserOreRefuge userOreRefuge) {
		return DaoHelper.getUserOreRefugeDaoImpl().add(userOreRefuge);
	}

	public static boolean updateUserOreRefuge(UserOreRefuge userOreRefuge) {
		return DaoHelper.getUserOreRefugeDaoImpl().update(userOreRefuge);
	}

	public static Map<Long, List<OreWarRecord>> getOreWarRecordMap(int activityId) {
		return DaoHelper.getOreWarRecordDaoImpl().getOreWarRecordMap(activityId);
	}

	public static boolean addOreWarRecordList(List<OreWarRecord> oreWarRecordList){
		return DaoHelper.getOreWarRecordDaoImpl().addOreWarRecordList(oreWarRecordList);
	}

	public static Map<Integer, UserOreWarPatronsData> getUserOreWarPatronsDataMap(long userId,int activityId) {
		return DaoHelper.getUserOreWarPatronsDaoImpl().getUserOreWarPatronsDataMap(userId,activityId);
	}

	public static boolean addUserOreWarPatronsData(UserOreWarPatronsData userOreWarPatronsData) {
		return DaoHelper.getUserOreWarPatronsDaoImpl().add(userOreWarPatronsData);
	}

	public static boolean updateUserOreWarPatronsData(UserOreWarPatronsData userOreWarPatronsData) {
		return DaoHelper.getUserOreWarPatronsDaoImpl().update(userOreWarPatronsData);
	}

	public static boolean updateUserOreWarPatronsData(long userId, List<Integer> patronsIdList, int dispatchOre, int activityId, int pitId) {
		return DaoHelper.getUserOreWarPatronsDaoImpl().updateUserOreWarPatronsData(userId, patronsIdList, dispatchOre, activityId, pitId);
	}

	public static LinkedList<OreWarNotice> getOreWarNoticeList(int activityId,int maxCount) {
		return DaoHelper.getOreWarNoticeDaoImpl().getOreWarNoticeList(activityId,maxCount);
	}

	public static boolean addOreWarNoticeList(List<OreWarNotice> noticeList) {
		return DaoHelper.getOreWarNoticeDaoImpl().addOreWarNoticeList(noticeList);
	}

	public static UserOreData getUserOreData(long userId) {
		return DaoHelper.getUserOreDataDaoImpl().getUserOreData(userId);
	}

	public static Map<Long, UserOreData> getUserOreDataMap() {
		return DaoHelper.getUserOreDataDaoImpl().getUserOreDataMap();
	}

	public static boolean addUserOreData(UserOreData userOreData) {
		return DaoHelper.getUserOreDataDaoImpl().add(userOreData);
	}

	public static boolean updateUserOreData(UserOreData userOreData) {
		return DaoHelper.getUserOreDataDaoImpl().update(userOreData);
	}

	public static UserOreWarHp getUserOreWarHp(int activityId,long userId) {
		return DaoHelper.getUserOreWarHpDaoImpl().getUserOreWarHp(activityId,userId);
	}

	public static boolean addUserOreWarHp(UserOreWarHp data) {
		return DaoHelper.getUserOreWarHpDaoImpl().add(data);
	}

	public static boolean updateUserOreWarHp(UserOreWarHp data) {
		return DaoHelper.getUserOreWarHpDaoImpl().update(data);
	}
}
